package bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * User entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "user", catalog = "es_knowledge_base")
public class User implements java.io.Serializable {

	// Fields

	private String userId;
	private String userPwd;
	private Integer userRole;
	private String userPermission;

	// Constructors

	/** default constructor */
	public User() {
	}

	/** minimal constructor */
	public User(String userId, String userPwd, Integer userRole) {
		this.userId = userId;
		this.userPwd = userPwd;
		this.userRole = userRole;
	}

	/** full constructor */
	public User(String userId, String userPwd, Integer userRole,
			String userPermission) {
		this.userId = userId;
		this.userPwd = userPwd;
		this.userRole = userRole;
		this.userPermission = userPermission;
	}

	// Property accessors
	@Id
	@Column(name = "user_id", unique = true, nullable = false, length = 45)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "user_pwd", nullable = false, length = 45)
	public String getUserPwd() {
		return this.userPwd;
	}

	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}

	@Column(name = "user_role", nullable = false)
	public Integer getUserRole() {
		return this.userRole;
	}

	public void setUserRole(Integer userRole) {
		this.userRole = userRole;
	}

	@Column(name = "user_permission", length = 45)
	public String getUserPermission() {
		return this.userPermission;
	}

	public void setUserPermission(String userPermission) {
		this.userPermission = userPermission;
	}

}